<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>用户管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		function page(n,s){
			if(n) $("#pageNo").val(n);
			if(s) $("#pageSize").val(s);
			$("#searchForm").attr("action","${ctx}/mms/user/list");
			$("#searchForm").submit();
	    	return false;
	    }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/mms/user/list">用户列表</a></li>
		<li><a href="${ctx}/mms/user/form">新增用户</a></li>
	</ul>
	<form:form id="searchForm" modelAttribute="mmsUserManagement" action="${ctx}/mms/user/list" method="post" class="breadcrumb form-search ">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" callback="page();"/>
		<ul class="ul-form">
			<li><label>用户名：</label><form:input path="username" htmlEscape="false" maxlength="50" class="input-medium"/></li>
			<li><label>姓名：</label><form:input path="truename" htmlEscape="false" maxlength="20" class="input-medium"/></li>
			<li><label>手机号：</label><form:input path="mobilePhone" htmlEscape="false" maxlength="20" class="input-medium"/></li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="搜索" onclick="return page();"/></li>
			<li class="btns"><a href="${ctx}/mms/user/form?id=${mmsUserManagement.id}"><input id="btnSubmit" class="btn btn-primary" type="submit" value="新增  "onclick="return page();"/></a></li>
			
		</ul> 
	</form:form>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead><th class="sort-column id">ID</th><th class="sort-column name">用户名</th><th>姓名</th><th>手机号</th><th>操作</th></thead>
		<tbody>
		<c:forEach items="${page.list}" var="user">
			<tr>
			<td><a href="${ctx}/mms/user/form?id=${user.id}">${user.id }</a></td>
				<td>${user.username}</td>
				<td>${user.truename}</td>
				<td>${user.mobilePhone}</td>
				<td>
    				<a href="${ctx}/mms/user/form?id=${user.id}">修改</a>
					<a href="${ctx}/mms/user/delete?id=${user.id}" onclick="return confirmx('确认要删除该用户吗？', this.href)">删除</a>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>